package com.weibo.listener;

import javax.jms.Message;
import javax.jms.MessageListener;

import org.springframework.scheduling.annotation.Async;

import com.weibo.async.CustomerServiceStrategy;
import com.weibo.async.SendMicroblogStrategy;

@SuppressWarnings({"unchecked","rawtypes"})
public class SendMicroblogReceive implements MessageListener {
	
	private CustomerServiceStrategy strategy;
	
	@Override
	@Async("mqExecutor")
	public void onMessage(Message message) {
		strategy = new SendMicroblogStrategy();
		strategy.doService(message);
	}

}
